<template>
	<view>
		<view class="table">
			<view class="uni-padding-wrap uni-common-mt">
				<uni-segmented-control :current="current" :values="items" style-type="text" active-color="#007aff"
					@clickItem="onClickItem" />
			</view>
			<view class="content">
				<view v-show="current === 0">
					<individual></individual>
				</view>
				<view v-show="current === 1">
					<Park></Park>
				</view>
				<view v-show="current === 2">
					<Nonpark></Nonpark>
				</view>
			</view>
		</view>
	</view>
</template>


<script setup>
    import individual from "../../components/Individual-Registration/Individual-Registration.vue"
	import Park from "../../components/Park-Registration/Park-Registration.vue"
	import Nonpark from "../../components/Non-park/Non-park.vue"
	import {ref,reactive} from "vue"


	const items = reactive(['个人注册', "园区注册", "非园区注册"])
	const current = ref(0)


	function onClickItem(e) {
		if (current.value !== e.currentIndex) {
			current.value = e.currentIndex
		}
	}
</script>


<style>
	.table {
		position: relative;
		top: 40rpx;
	}
</style>